import { RequestConfigExtra, usePost } from "@/http"

const queryOptions: RequestConfigExtra = {
    success: false,
    error: true
}

const options: RequestConfigExtra = {
    success: true,
    error: true
}

const info = async () => {
    return usePost("/system/profile/info", {}, queryOptions)
}

const updateInfo = async (params: any) => {
    return usePost("/system/profile/updateInfo", params ?? {}, options)
}

const updatePassword = async (params: any) => {
    return usePost("/system/profile/updatePassword", params ?? {}, options)
}

export const api = { info, updateInfo, updatePassword }
